package com.itboye.sunsun.utils;

import com.itboye.sunsun.application.App;

import android.os.Handler;
import android.os.Looper;
import android.widget.Toast;

public class DebugToast {

	public static void show(final Object obj,final int time){
		if (Debug.isDebug==false) {
			return;
		}
		new Handler(Looper.getMainLooper()){
			public void handleMessage(android.os.Message m) {
				String msg;
				if (obj==null) {
					msg="null";
				}else{
					msg=obj.toString();
				}
				Toast.makeText(App.ctx, msg, time).show();
			};
		}.sendEmptyMessage(0);
		
	}
}
